<html>
<head><meta charset="utf-8"><title>worklist · t-compiler/wg-parselib · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/index.html">t-compiler/wg-parselib</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html">worklist</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208408803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/208408803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#208408803">(Aug 29 2020 at 00:51)</a>:</h4>
<p>This is a topic to collect "maybe" work items -- from bona fide issues, to vague ideas which needs some looking into before deciding if they are good.</p>



<a name="208408813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/208408813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#208408813">(Aug 29 2020 at 00:51)</a>:</h4>
<ul>
<li><a href="https://github.com/rust-lang/rust/issues/76046">https://github.com/rust-lang/rust/issues/76046</a> -- seems something we should do, but is a bit unclear how</li>
</ul>



<a name="208408870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/208408870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#208408870">(Aug 29 2020 at 00:53)</a>:</h4>
<ul>
<li>removing <code>StringReader</code> from <code>code_block_checker</code></li>
</ul>



<a name="208408873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/208408873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#208408873">(Aug 29 2020 at 00:54)</a>:</h4>
<p>Similar to the previous issue, this thing uses <code>StringReader</code>: <a href="https://github.com/rust-lang/rust/blob/master/src/librustdoc/passes/check_code_block_syntax.rs">https://github.com/rust-lang/rust/blob/master/src/librustdoc/passes/check_code_block_syntax.rs</a></p>



<a name="208408961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/208408961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#208408961">(Aug 29 2020 at 00:56)</a>:</h4>
<p>It caches <em>some</em> syntax errors in code blocks, but definitely not all of them (as it uses string reader, and not the parser).  This feels like a weird middle ground. I think (but am not sure), that we should do either of the following:</p>
<ul>
<li>replace <code>StringReader</code> here with <code>rustc_lexer</code> -- we'll be able to say if the code block is valid or not, but we'll lose error reporting fore code inside fenced blocks.</li>
<li>replace <code>StringReader</code> with a full parser, so that we get a complete set of syntax errors.</li>
</ul>



<a name="208429299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/208429299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#208429299">(Aug 29 2020 at 11:26)</a>:</h4>
<h1>Removing FatalErrors from StringReader</h1>
<p><a href="https://github.com/rust-lang/rust/issues/76065">https://github.com/rust-lang/rust/issues/76065</a></p>
<p>This seems to be a nice, independent up-for-grabs piece of work, so cc <span class="user-mention" data-user-id="255061">@LeSeulArtichaut</span></p>



<a name="209101557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/254930-t-compiler/wg-parselib/topic/worklist/near/209101557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/254930-t-compiler/wg-parselib/topic/worklist.html#209101557">(Sep 04 2020 at 14:44)</a>:</h4>
<h1>Fixing <code>into_token_trees</code> error reporting</h1>
<p>This signature feels just wrong: <a href="https://github.com/rust-lang/rust/blob/ef55a0a92f3cb6572ef67d99f4aefbdeb7b6b804/compiler/rustc_parse/src/lexer/tokentrees.rs#L15">https://github.com/rust-lang/rust/blob/ef55a0a92f3cb6572ef67d99f4aefbdeb7b6b804/compiler/rustc_parse/src/lexer/tokentrees.rs#L15</a></p>
<p>In this function, there are three disjoint channels for reporting errors:</p>
<ul>
<li>One error we return as an <code>Err</code></li>
<li>Other errors we buffer into <code>Vec&lt;UnmachedBrace&gt;</code></li>
<li>And yet other errors we directly emit</li>
</ul>
<p>This needs to be cleaned up  <em>somehow</em>, but I've looked at it for half an hour today, and didn't find easy simplifications</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>